''========================================================
'' Autor: 		Luis Antonio Lara Capetillo
'' Fecha Creación: 	25/9/2012
'' Descripcion: 	Clase Componente ctlPCargaDatos
''========================================================

Public Class ctlPCargaDatos

	  Public Event btnproducto Clicked As EventHandler

	  Public Event btnembalaje Clicked As EventHandler

	  Public Event btnproducto Clicked As EventHandler

	  Public Event btnarea Clicked As EventHandler

	  Public Event btnnombre Clicked As EventHandler

	  Public Event btnnombre Clicked As EventHandler

	  Public Event btnpuerto Clicked As EventHandler

	  Public Event btnmarca Clicked As EventHandler

#Region "Propiedades"


  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblproducto
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblproductoTitulo() As String
    Get
      Return Me.lblproducto.Text
    End Get
    Set(value As String)
      Me.lblproducto.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lbldesc_Embalaje
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lbldesc_EmbalajeTitulo() As String
    Get
      Return Me.lbldesc_Embalaje.Text
    End Get
    Set(value As String)
      Me.lbldesc_Embalaje.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor desc_Embalaje del TextBox txtdesc_Embalaje
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property desc_Embalaje() As String
    Get
      Return Me.txtdesc_Embalaje.Text
    End Get
    Set(value As String)
      Me.txtdesc_Embalaje.Text = value
    End Set
  End Property



  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lbldesc_producto
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lbldesc_productoTitulo() As String
    Get
      Return Me.lbldesc_producto.Text
    End Get
    Set(value As String)
      Me.lbldesc_producto.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor desc_producto del TextBox txtdesc_producto
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property desc_producto() As String
    Get
      Return Me.txtdesc_producto.Text
    End Get
    Set(value As String)
      Me.txtdesc_producto.Text = value
    End Set
  End Property



  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lbldesc_Area
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lbldesc_AreaTitulo() As String
    Get
      Return Me.lbldesc_Area.Text
    End Get
    Set(value As String)
      Me.lbldesc_Area.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor desc_Area del TextBox txtdesc_Area
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property desc_Area() As String
    Get
      Return Me.txtdesc_Area.Text
    End Get
    Set(value As String)
      Me.txtdesc_Area.Text = value
    End Set
  End Property



  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnombre
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnombreTitulo() As String
    Get
      Return Me.lblnombre.Text
    End Get
    Set(value As String)
      Me.lblnombre.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor nombre del TextBox txtnombre
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property nombre() As String
    Get
      Return Me.txtnombre.Text
    End Get
    Set(value As String)
      Me.txtnombre.Text = value
    End Set
  End Property



  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnombre
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnombreTitulo() As String
    Get
      Return Me.lblnombre.Text
    End Get
    Set(value As String)
      Me.lblnombre.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor nombre del TextBox txtnombre
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property nombre() As String
    Get
      Return Me.txtnombre.Text
    End Get
    Set(value As String)
      Me.txtnombre.Text = value
    End Set
  End Property



  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblnom_Puerto
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblnom_PuertoTitulo() As String
    Get
      Return Me.lblnom_Puerto.Text
    End Get
    Set(value As String)
      Me.lblnom_Puerto.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor nom_Puerto del TextBox txtnom_Puerto
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property nom_Puerto() As String
    Get
      Return Me.txtnom_Puerto.Text
    End Get
    Set(value As String)
      Me.txtnom_Puerto.Text = value
    End Set
  End Property



  ''' <summary>
  ''' Obtiene o establece el texto que contiene la etiqueta lblmarca
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property lblmarcaTitulo() As String
    Get
      Return Me.lblmarca.Text
    End Get
    Set(value As String)
      Me.lblmarca.Text = value
    End Set
  End Property

  ''' <summary>
  ''' Obtiene o estable el valor desc_Marca del TextBox txtdesc_Marca
  ''' </summary>
  ''' <value>valor tipo String</value>
  ''' <returns>valor tipo String</returns>
  ''' <remarks></remarks>
  Public Property desc_Marca() As String
    Get
      Return Me.txtdesc_Marca.Text
    End Get
    Set(value As String)
      Me.txtdesc_Marca.Text = value
    End Set
  End Property



  ''' <summary>
  ''' Habilita o Desabilita el Control para Edicion
  ''' </summary>
  ''' <value>True o False</value>
  ''' <remarks></remarks>
  Public WriteOnly Property Enabled() As Boolean
    Set(value As Boolean)
	  btnproducto.Enabled=value
      txtdesc_Embalaje.Enabled=value
      btnembalaje.Enabled=value
      txtdesc_producto.Enabled=value
      btnproducto.Enabled=value
      txtdesc_Area.Enabled=value
      btnarea.Enabled=value
      txtnombre.Enabled=value
      btnnombre.Enabled=value
      txtnombre.Enabled=value
      btnnombre.Enabled=value
      txtnom_Puerto.Enabled=value
      btnpuerto.Enabled=value
      txtdesc_Marca.Enabled=value
      btnmarca.Enabled=value
      
    End Set
  End Property

  ''' <summary>
  ''' Habilita o Desabilita el Control para solo lectura
  ''' </summary>
  ''' <value>True o False</value>
  ''' <remarks>ReadOnly</remarks>
  Public WriteOnly Property Lectura() As Boolean
    Set(value As Boolean)
	  btnproducto.ReadOnly=value
      txtdesc_Embalaje.ReadOnly=value
      btnembalaje.ReadOnly=value
      txtdesc_producto.ReadOnly=value
      btnproducto.ReadOnly=value
      txtdesc_Area.ReadOnly=value
      btnarea.ReadOnly=value
      txtnombre.ReadOnly=value
      btnnombre.ReadOnly=value
      txtnombre.ReadOnly=value
      btnnombre.ReadOnly=value
      txtnom_Puerto.ReadOnly=value
      btnpuerto.ReadOnly=value
      txtdesc_Marca.ReadOnly=value
      btnmarca.ReadOnly=value
      
    End Set
  End Property


#End Region
#Region "Eventos"
  Protected Sub btnproducto_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnproducto.Click
    OnbtnproductoClick(sender)
  End Sub

  Protected Sub btnembalaje_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnembalaje.Click
    OnbtnembalajeClick(sender)
  End Sub

  Protected Sub btnproducto_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnproducto.Click
    OnbtnproductoClick(sender)
  End Sub

  Protected Sub btnarea_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnarea.Click
    OnbtnareaClick(sender)
  End Sub

  Protected Sub btnnombre_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnnombre.Click
    OnbtnnombreClick(sender)
  End Sub

  Protected Sub btnnombre_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnnombre.Click
    OnbtnnombreClick(sender)
  End Sub

  Protected Sub btnpuerto_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnpuerto.Click
    OnbtnpuertoClick(sender)
  End Sub

  Protected Sub btnmarca_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles btnmarca.Click
    OnbtnmarcaClick(sender)
  End Sub

#End Region
#Region "Metodos"
  Protected Overridable Sub OnbtnproductoClick(ByVal sender As Object)
    RaiseEvent btnproductoClicked(sender, New EventArgs)
  End Sub

  Protected Overridable Sub OnbtnembalajeClick(ByVal sender As Object)
    RaiseEvent btnembalajeClicked(sender, New EventArgs)
  End Sub

  Protected Overridable Sub OnbtnproductoClick(ByVal sender As Object)
    RaiseEvent btnproductoClicked(sender, New EventArgs)
  End Sub

  Protected Overridable Sub OnbtnareaClick(ByVal sender As Object)
    RaiseEvent btnareaClicked(sender, New EventArgs)
  End Sub

  Protected Overridable Sub OnbtnnombreClick(ByVal sender As Object)
    RaiseEvent btnnombreClicked(sender, New EventArgs)
  End Sub

  Protected Overridable Sub OnbtnnombreClick(ByVal sender As Object)
    RaiseEvent btnnombreClicked(sender, New EventArgs)
  End Sub

  Protected Overridable Sub OnbtnpuertoClick(ByVal sender As Object)
    RaiseEvent btnpuertoClicked(sender, New EventArgs)
  End Sub

  Protected Overridable Sub OnbtnmarcaClick(ByVal sender As Object)
    RaiseEvent btnmarcaClicked(sender, New EventArgs)
  End Sub

  ''' <summary>
  ''' Metodo para asignar los datos al componente ctlTurismo
  ''' </summary>
  ''' <param name="tablaDatos">DataTable donde se obtienen los datos</param>
  ''' <remarks></remarks>
  Public Sub AsignarDatos(ByVal tablaDatos As DataTable)
    Me.txtdesc_Embalaje.Text= tablaDatos.Rows(0)("desc_Embalaje").ToString
    Me.txtdesc_producto.Text= tablaDatos.Rows(0)("desc_producto").ToString
    Me.txtdesc_Area.Text= tablaDatos.Rows(0)("desc_Area").ToString
    Me.txtnombre.Text= tablaDatos.Rows(0)("nombre").ToString
    Me.txtnombre.Text= tablaDatos.Rows(0)("nombre").ToString
    Me.txtnom_Puerto.Text= tablaDatos.Rows(0)("nom_Puerto").ToString
    Me.txtdesc_Marca.Text= tablaDatos.Rows(0)("desc_Marca").ToString
    
  End Sub


















#End Region
End Class
